//
//  ZJCommWithImageItem.m
//  ZiJinLian
//
//  Created by lc on 2017/3/23.
//  Copyright © 2017年 lzy. All rights reserved.
//

#import "ZJCommWithImageItem.h"

@implementation ZJCommWithImageItem

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/





-(instancetype)zjCommItemInitWithTitle:(NSString *)title image:(NSString *)image{
    _btn=[ZJUITools getBtnWithImage:image title:title];
    [_btn setImageEdgeInsets:UIEdgeInsetsMake(0, -10, 0, 0)];
    _arrow=[ZJUITools getArrowImage];
    [self addSubview:_arrow];
    [self addSubview:_btn];

    self.backgroundColor=[UIColor whiteColor];
    [self.arrow mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.mas_centerY);
        make.right.equalTo(self.mas_right).offset(-10);
        make.height.mas_equalTo(10);
        make.width.mas_equalTo(10);
    }];
    [_btn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.mas_centerY);
        make.left.equalTo(self.mas_left).offset(20);
    }];

    return self;
}






@end
